Skip to main content

Close Window

AutomatR.Windows.Activities.CloseWindow

The "Close Window" activity in AutomatR for Windows UI Automation enables you to close an existing application window. This activity is useful for automating window management tasks in Windows applications.

Properties

NameDescription
Input
Process NameEnter the process name of the window app that needs to be closed. String variables containing the process name.
Process TitleEnter the process title of the window app that needs to be closed. String variables containing the process title.
Display TitleEnter the title of the window app that needs to be closed. String variables containing the window title.
WindowEnter the window variable for the app that has to be closed. InArgument<SelectorWindow> variables containing information about the window.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before starting the activity. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.

How to use:

  1. Drag and drop the "Close Window" activity onto the workflow.
  2. Configure the properties by specifying either the Process Name, Process Title, Display Title, or the Window variable to identify the target application window.
  3. Optionally, configure the delay setting.
  4. Execute the workflow to close the specified window.

Example: Consider an example where the "Close Window" activity is used to close a Notepad application window:

Close Window:
Display Name: "Close Notepad Window"
Process Name: "notepad"

In this example, the activity identifies the Notepad application by process name and closes its window.